- In the extension bar, click the AdBlock Plus icon
- Click the large blue toggle for this website
- Click refresh
- In the extension bar, click the AdBlock icon
- Under "Pause on this site" click "Always"
- In the extension bar, click on the Adguard icon
- Click on the large green toggle for this website
- In the extension bar, click on the Ad Remover icon
- Click "Disable on This Website"
- In the extension bar, click on the orange lion icon
- Click the toggle on the top right, shifting from "Up" to "Down"
- In the extension bar, click on the Ghostery icon
- Click the "Anti-Tracking" shield so it says "Off"
- Click the "Ad-Blocking" stop sign so it says "Off"
- Refresh the page
- In the extension bar, click on the uBlock Origin icon
- Click on the big, blue power button
- Refresh the page
- In the extension bar, click on the uBlock icon
- Click on the big, blue power button
- Refresh the page
- In the extension bar, click on the UltraBlock icon
- Check the "Disable UltraBlock" checkbox
- Please disable your Ad Blocker
- Disable any DNS blocking tools such as AdGuardDNS or NextDNS
- Disable any privacy or tracking protection extensions such as Firefox Enhanced Tracking Protection or DuckDuckGo Privacy.
If the prompt is still appearing, please disable any tools or services you are using that block internet ads (e.g. DNS Servers, tracking protection or privacy extensions).
Question
jaschen
Hi,
I am having trouble using LinkLabel on Windows Form.
The scenario is like this:
I have a client listening and receiving links from a server.
The client updates its link on the UI with the links received.
How I did this is that I have an empty LinkLabel configured as the placeholder.
When I received links from the server, I do:
if (myLinkLabel.Links.Count !=0 ) //assuming that there will only be one link on this linklabel
{
myLinkLabel.RemoveAt(0);
}
myLinkLabel.Links.Add (0, strstr.Length, strstr); //strstr is the URL received form the server
However, I would get this exception:
System.ArgumentNullException: Value cannot be null.
Parameter name: region
at System.Drawing.Graphics.IntersectClip(Region region)
at System.Windows.Forms.LinkLabel.PaintLink(Graphics g, Link link, Brush foreBrush, Brush linkBrush, Boolean optimizeBackgroundRendering)
at System.Windows.Forms.LinkLabel.OnPaint(PaintEventArgs e)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Label.WndProc(Message& m)
at System.Windows.Forms.LinkLabel.WndProc(Message& msg)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
My guess is that when it's trying to paint the Windows, there was no link found.
Can anyone tell me how I should go about solving this or is there a better way that I should do this?
thanks a bunch!!!!
:)
Link to comment
https://www.neowin.net/forum/topic/164041-trouble-with-c-windows-forms-control-linklabel/Share on other sites
1 answer to this question
Recommended Posts