|
I am trying to show a winform window using threads like this
Dim aFrmAlertPopUp As New AlertWindow(messages, altSysOrigin, alertId, BgColor, userAlias, altTeamMember, altAlertType, "SAS", Me.ControlToUpdate, "", alertGUID, alertCaseNO)
Dim backgroundThread As New Thread(AddressOf aFrmAlertPopUp.display)
backgroundThread.Start()
The Class AlertWindow works like a msn messenger warning window, when I instantiate I pass the values to the class
then I call the method display that will load values and display the window
this is how it was before (when it was actually working)
Dim aFrmAlertPopUp As New AlertWindow(messages, altSysOrigin, alertId, BgColor, userAlias, altTeamMember, altAlertType, "SAS", Me.ControlToUpdate, "", alertGUID, alertCaseNO)
aFrmAlertPopUp.display
Now, when I call backgroundThread.Start() it doesn't work
is the thread.start() the right call?
Am I doind anything wrong?
thanks
|
|
|
|
|
Standard question #1:
What do you mean by "not working"?
Standard question #2:
What error message do you get?
---
b { font-weight: normal; }
|
|
|
|
|
After searching many sites trying to find a free custom propertygrid / propertylist i have come up empty handed, there are a few for c++ but nothing free for vb.net. I reason i am looking for a free propertygird is because i want to use it in a open source project i am working on.
So i decided to have a go at creating one myself... this being my first custom control that i have tried to create its proving to be a chalange. Ok any anyways lets see if anyone can help me with a few problems.
I have a collection for Categories and a collection for Entries.
Cateogies are like the headers as such with the + - in the propertygrid
The entry collection is a object. I then set the object to say ie a textbox entry or a progress bar entry...
This has all gone well so far.
Problem/Suggestion 1
I basically draw the lable on the left, value on the right using drawstring. When i click on an entry i then dynamically add a textbox basically the size of the value side. I set the focus to the textbox. Set the value of the textbox and hide the border amoungst other things. Is this the best way of doing this? This method works, but seems a bit clumsy when font size changes. I was thinking that maybe instead i need to capture keypresses and use draw string to draw changes unstead of using a textbox.
Problem/Suggestion 2
I am going to use the render part of controls to draw the progressbar and buttons. But a control i am slightly lost with adding as an entry is a combobox. I can add the combobox like i did with the textbox above but i cant resize the combobox small enough to the size i would like it without it screwing up. Using the renderer i can draw the button for the combobox but yea i dont know how to draw the actuall box part. I started to experiment with adding a usercontrol with say a listbox and then showing that as the drop down part. Does any 1 have any suggestions on this?
Problem/Suggestion 3
I supose i will at some stage want to show tool tips for half hidden lables or values ... any one know where to begin on this?
if u would like to see what it sort of looks like atm
http://gtools.sourceforge.net/pg.JPG
the horrible choise of colours is just to see where things are drawn
Thanks
|
|
|
|
|
Hi, please feel free to add, modify and use source code from my recent article:
http://www.codeproject.com/useritems/PropertyGridEx.asp
Kind Regards
|
|
|
|
|
Hi folks,
I'm wondering if anyone can give me some pointers to how to trap a MessageBox put up by a web broswer that's lauched by VB.NET. Or you can offer advice on what I should be doing.
Here's the scenario.
I'm on a Windows Server 2003 system in VB.NET. I send information up to a web site. If an error occurs, an HTML page with Javascript code is returned. That javascript contains the line
<body background="/images/comsplit1.gif" onload = loadDates(document.Schedules_form),fieldFocus(document.Schedules_form),noSchedulesFound()>
The noSchedulesFound() is an example of one of a number of function calls in the code indicating the error. All the error functions call the JavaScript alert() function with a text message, which basically brings up a message box with this information. The problem is that this is automated system running on a server. No one is going to be there to see the message box.
What I want to do is trap the message being displayed and write it somewhere else. I could of course parse through the HTML file and Javascript code, but that seems not as robust. I don't have control over that and I'd rather trap the message itself at the MessageBox level so if the structure of the messages changes, nothing breaks. It's safer to assume that it's always going bring up a Messagebox since this is an interactive HTML page. I could also intercept the HTML page and write in some
Javascript code which would send the message elsewhere, but again that is very dependent on the structure of the code.
So if I were going to trap the MessageBox, how would I do that? I've not been able to find anything on how to tell me to do that easily in VB.NET. I can't find an event I can hook when a MessageBox comes up. I'm hoping I don't have to go down to the subclassing the window level in Windows Programming. That's not something I've done before.
Any pointers would be much appreciated.
Rob
|
|
|
|
|
how to embed crystel report in vs 2.0 2005 express
|
|
|
|
|
how to bind data gridview
like
''''''''''''''
if i have
table data like
col1 col2
----- ------
str1 district
str2 district
str3 tehsil
str4 union council
str5 tehsil
and i have form like
3 redion buts as
radiodistrict radiotehsil radiounioncouncil
and 1 datagridview
which will show only those record whose radiobutton is checked
tnx
|
|
|
|
|
I wrote this code, it let me to free drawing in PictureBox1. But i want to use the image of it to do smt else. e.g. copy to a bitmap object. But i can't, it show that there are "nothing" in the PictureBox1.image property.
So i wonder where the "drawing" i made is? Isn't it in the PictureBox1.image??
Pls help me, i getting stuck at this point..!
Code:
Private Sub PictureBox1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseDown<br />
If e.Button = MouseButtons.Left Then<br />
mousePath.StartFigure()<br />
End If<br />
End Sub<br />
<br />
Private Sub PictureBox1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseMove<br />
If e.Button = MouseButtons.Left Then<br />
Dim g As Graphics = Graphics.FromHwnd(PictureBox1.Handle)<br />
Dim myPen As Pen = New Pen(myColor)<br />
mousePath.AddLine(e.X, e.Y, e.X, e.Y)<br />
g.DrawPath(myPen, mousePath)<br />
End If<br />
<br />
textX.Text = e.X.ToString()<br />
textY.Text = e.Y.ToString()<br />
End Sub
|
|
|
|
|
That is because you don't have an image in the picturebox. You are just drawing on screen where the picturebox happens to be, you are not drawing in the picturebox.
Create an image (Bitmap) and put that in the picturebox. Then you draw on the image by using Graphics.FromImage(PictureBox1.Image) instead, and invalidate the picturebox to make the changes visible. As you have drawn on the actual image in the picturebox, you can then save what you have drawn.
---
b { font-weight: normal; }
|
|
|
|
|
Ohh, you shot it!! Many thanks for you. i've not slept for 2 days just looking for it... Yes..!
Thanks again...
|
|
|
|
|
Sleep well.
---
b { font-weight: normal; }
|
|
|
|
|
I'm doing something similiar but I want to copy only a portion of an image in a PictureBox control then save it as a new image.
This is as part of a small app I'm writing to crop images using a rubber-band type tool to define the area of the image to save. I have the image loaded into the PictureBox control and I can do the "rubber band" effect to draw the rectangle... but I can't work out how to then create a new image or bitmap from the area of the loaded image defined by the rectangle - anyone know what I need to do to do this?
TIA for any pointers or advise...
Mike
|
|
|
|
|
Create a new Bitmap with the size of the area, and draw the selected part of the picture box image on the new bitmap.
---
b { font-weight: normal; }
|
|
|
|
|
I have a working vb.net application that I can build and run. I included a .chm help file.
The problem is this, I could see it coming.
In my application I set the help provider HelpNamespace to the path for my .chm file.
That is fine on my test machine, I have when I build
.exe
.chm
and a aplication.exe.config file that has inside it
add key="HelpProvider1.HelpNamespace" value=c:\etc...\xxxx.chm
Unfortunately, when I try to create a deployment setup.exe file it will do an install, but when I try to run the program it fails with
"Additional information: The key 'HelpProvider1.HelpNamespace' does not exist in the appSettings configuration section."
This makes sense because the setup does not create a config file which is where the HelpNamespace path exists.
So my question is how do I make a deployment setup for a vb.net application that has a helpProvider pointing at a .chm file??
or
How do I include the .chm in my deployment and the executable can find it?
Thank you.
nutrino149 <tdamico@rainsoft.com>
|
|
|
|
|
How about using a relative path based on the config file's location?
Ed
|
|
|
|
|
Because it is not were the config file is it is what is inside the config file.
The config file looks like:
to make sure it all displays properly in my replay -->
That seems to me to be the problem. I could do the installs myself and tweak it if necessary, but wanted the install to be unattended.
Sorry if my understanding is not that great, have not done tomany .net vb programs before.
|
|
|
|
|
So where is the config file kept? If it's in the bin directory then you should be able to specify "nameofhelp.chm" rather than "C:\...\nameofhelp.chm".
Ed
|
|
|
|
|
I admit I have not written mamy Microsoft Demployment solutions, most of my resent stuff has been asp and aspx.
But as my manager has pointed out when you typically run an install the location of the
application is not written in stone (maybe it has to be for this?).
Typically you can install to any folder, say someone has there applications on the d drive instead of c.
So if possible (and I admit I am not an expert) it would be nice to be able to give the end user an install and have them just run it.
The config file which has inside of it the address to the .chm (help) file is installed with the application. It is that hard coded address inside the config which is the result of the HelpNamespace set inside the application. I have tried to dynamically set HelpNamespace but has not worked yet.
If I do not come accross a more eligent solutions I will just have to force and install to the same place and move on.
I can now see why some applicaitons set the help file to a web address, that too may be how I go. It just seems that there would be a more easy way to include the .chm but I have not coded an application using it before, oh well.
|
|
|
|
|
Well i feel stupid now.
I did try your suggestion by modifying the config file to just relative path and it failed. But I thought what the heck I will just recompile and setup again and it worked.
So thank you and I feel stupid, oh well, such is life.
|
|
|
|
|
Glad it's sorted
Ed
|
|
|
|
|
Hi,
How to develop a Grid control in VB.Net
Actual development is a
School Module Which looks like this
TEACHER'S NAME-> Andrew Bliend Karni Lisa
TIMINGS
!
9.00 ---- ----- ---- ----
9.30 ---- ----- ---- ----
10.00
.
.
.
Each schedule is blocked in that boxes to their corresponding timings under the corresponding teacher's name.
If we click in any box a Menu should be invoked in a message box so that we can schedule that time with some subject
Please help me out.
Ram
c.rameshbabu@hotmail.com
|
|
|
|
|
what?
was everybody else thinking that?
"If i was king cigarettes would be free."
|
|
|
|
|
Thanks for pointing me in the correct direction.
A couple things I have questions to anyone out there as well.
1..How and where can I get Crystal References 9.2.3300.0. I have CR 8.5 which have the wrong version
2..What is and where is REGWIZ.MSM
I am running .Net 2003
|
|
|
|
|
I get the message "Invalid or Missing Keycodev2.dll" when I try and run a Crystal Report in a PC that I have deployed a system that uses Crystal Reports.
1. The deployed PC does not have Crystal Reports package
2. I created the reports in CR 8.5 and link the viewer Reportsource to the file paths
3. I have tried registering keycodev2.dll
Any ideas on what I have done wrong?
|
|
|
|
|
BusinessObjects Support page[^] for that error message.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|