|
Hi,
i have stored some birthday date in DB
For example,
i have stored Jan 10 2009 in DB..
Wen this date will match into system date, automatically show some messages...
Tis is i need
|
|
|
|
|
1. When u start-up your project check system date and birthday date and show the list.
2. Use the command button show the Birthday list.
3. Use Timer Show the particular Date & Time that Event.
|
|
|
|
|
I am in need of generate the XML file using XML schema with VB.net.
Can any one give me the sample code for do this?
Best Regards
|
|
|
|
|
Why does the webbrowser.navigate control change my "&" to "&"? It messes up my URL.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim urlString As String
'urlString = "http://www.google.com"
urlString = "http://x.x.x.247/gw-bin/gwgtwy.dll/extAPuser+pass?RQ=FI" + Chr(38) + "TY=TIFF" + Chr(38) + "CO=Sherman" + Chr(38) + "DT=12/29/08" + Chr(38) + "RN=11" + Chr(38) + "BT=005" + Chr(38) + "SE=00470" + Chr(38) + "EQ"
System.Windows.Forms.MessageBox.Show(urlString)
WebBrowser1.Navigate(urlString)
End Sub
At that point I receive an 'Invalid Character' and 'Object Expected' error.
The message box displays correctly but when I call in the control it does this, from MSE debug session:
<html><head><script src="res://mshtml.dll/objectembed_neutral.js"></script></head><body objectSource="http://x.x.x.247/gw-bin/gwgtwy.dll/extAPS1user+pass?RQ=FI&TY=TIFF&CO=Sherman&DT=12/29/08&RN=11&BT=005&SE=00470&EQ" onload="ObjectLoad();" leftmargin=0 topmargin=0 scroll=no> <form id="objectDestination"></form> </body></html>
Thanks!
|
|
|
|
|
rss_bateman wrote: Chr(38)
What is this ugliness ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Let me simplify the issue, that does look pretty brutal on my part and I'm just now starting to do some development with vb.net so I'm a n00b....
When using the webbrowser.navigate my URL has several variables I must pass in order to retrieve an image.
If I use a simple URL like webbrowser.navigate("http://www.codeproject.com") it works just fine but
If i use an URL with variables like:
webbrowser.navigate("http://www.codeproject.com/script/Forums/Edit.aspx?fid=1646&select=2861396&floc=/script/Forums/View.aspx&fa=r") it does not and returns those 2 messages. When I start a debug session using Microsoft Script Editor the url has been parsed and is using & instead & in the url.
Does this make sense?
|
|
|
|
|
I have a form , which contains the button , on clicking the button opens a child form. If I again clicks that button , My program does not
open the duplicate instance , But I have a case when there is a usability issue.
If I change the window state of the child form window like I change it to Normal and afterwards I minimize it.
Then my program assumes that the child form state is minimize and change it's state to maximize, But this should not happen ,
So
How should i change the window state to Restore as the window state is presently minimized and restored?
Or
1.What should I do if it was maximized and then it is minimized?
2.What should I do if it is Restored and then it is minimized?
If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
|
|
|
|
|
Pankaj Garg wrote: I have a form , which contains the button , on clicking the button opens a child form.
What type of apps is this? Is this a MDI app? If not, you might want to show the form with .showdialog.
Post your code so we can see what you're doing.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Hello all, there is a problem that I want to ask:
I have made 2 UserControls using Visual Basic 2005. Let's say the names are UserControl1 and UserControl2 . Both were made under the same project that I name it: WindowsControlLibrary1. On both of them, I put different components, in UserControl1 I use a DataGridView component, and in the other one, I put a TextBox and a Button or something.
After scripting on both of them, I built the project and I got 1 dll file: WindowsControlLibrary1.dll.
Now, I want to make new project, I create 1 MDI form. And I want to make that MDI form to be the parent of 2 MDI child form: UserControl1 and UserControl2 that I can get from WindowsControlLibrary1.dll.
How can I do that, what should I do to get the controls inside the dll file. I want to use it as part of the new project. So that if i call function like: UserControl1.Show(), the UserControl will be appeared under the main form of the new project, and have all function as child form.
Can someone help me? If I could do that, next I want to add the path of the dll inside SQL Server database. When I run the main form, it will read the path, and dinamically run them as the MDI child on runtime.
Thanks
Best Regard,
Indra Permana Rusli
- No Signature Available -
|
|
|
|
|
Indra_PR wrote: Now, I want to make new project, I create 1 MDI form. And I want to make that MDI form to be the parent of 2 MDI child form: UserControl1 and UserControl2 that I can get from WindowsControlLibrary1.dll.
If your controls are of the type usercontrol you can't do this. You can only add forms as mdi children.
To be able to use the controls you created you have to add a reference to the dll.
Project --> right mouse click --> add reference --> browse to your dll
|
|
|
|
|
But I don't want to link it when I code the new project, I want to link the project and the dll (add as reference) on runtime. Yesterday, I got a reference, telling to use Assembly.Load() Method.
I've tried to use it but it only succeed when I made my first project as a WindowsApplication and create Forms inside (not UserControl). Then when I deploy the project, I get an exe file and I can use it well with my project. But when I try use the WindowsControlLibrary with a dll output, I cannot do that, the compiler showed me an error.
I don't have my code right now, maybe I'll post it here later.
If possible, can someone give me a reference to use the dll and get the controls inside, or maybe give me an example related to this topic.
Please
Thanks
Best Regard,
Indra Permana Rusli
- No Signature Available -
|
|
|
|
|
You have several statements/questions here, some of which are confusing.
Indra_PR wrote: After scripting on both of them, I built the project and I got 1 dll file: WindowsControlLibrary1.dll.
What scripting are you doing or did you mean compile?
Indra_PR wrote: How can I do that, what should I do to get the controls inside the dll file. I want to use it as part of the new project. So that if i call function like: UserControl1.Show(), the UserControl will be appeared under the main form of the new project, and have all function as child form.
Normally, you would add a reference and then use the controls you created. If you intend on re-using the same form stle with the controls you created, you might want to make another .dll, create a template form with the custom controls you created and some public properties. You could then create the form (dynamically if really needed) at runtime (and the datagridview would be populated correctly depending on the value of the public properties) regardless where it's called from.
Code for creating assembly dynamically:
Try
ao = [Assembly].LoadFrom(sFullPathIncludingFileName)
o = ao.CreateInstance(sAssembly & "." & sClass, True)
Catch ex As Exception
Throw ex
End Try
Indra_PR wrote: Can someone help me? If I could do that, next I want to add the path of the dll inside SQL Server database. When I run the main form, it will read the path, and dinamically run them as the MDI child on runtime.
I don't think you would want to do this from a SQL database......doesn't make sense to do so. Generally, when calling a .dll natively from SQL, you want the .dll to be performing a complex operation that would perform better outside of SQL or gain 'easier' access to resources (folders, directories, ftp, email, etc); typically, you wouldn't want to display a GUI app.
Tackle one part at a time and try to remove some of the complexity you got going on.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
I made a function like this:
Public Shared Function LoadAssembly(ByVal AssemblyPath As String, ByVal ClassName As String) As Object
Dim objAssembly As Reflection.Assembly
objAssembly = Reflection.Assembly.LoadFrom(AssemblyPath)
Try
LoadAssembly = objAssembly.CreateInstance(ClassName, True)
Catch ex As Exception
MsgBox(ex.Message)
Return Nothing
End Try
If LoadAssembly Is Nothing Then
MsgBox("Assembly : " & AssemblyPath & vbNewLine & "Class : " & ClassName)
Return Nothing
End If
End Function
And I call the function in the form load of the new project:
Dim frm As Form
Try
frm = LoadAssembly("C:\WindowsControlLibrary1.dll", "WindowsControlLibrary1.Form1")
Me.IsMdiContainer = True
frm.MdiParent = Me
frm.Dock = DockStyle.Fill
frm.Show()
Catch ex As Exception
MsgBox(ex.Message)
End Try
In order to make it works, I create 1 form inside the WindowsControlLibrary1.dll that I name it Form1. But when I want to add the UserControl1 inside the form, I don't know what to do next.
Dim usc As Form
Try
usc = DirectCast(LoadAssembly("C:\WindowsControlLibrary1.dll", "WindowsControlLibrary1.UserControl1"), Form)
Me.IsMdiContainer = True
usc.MdiParent = Me
usc.Dock = DockStyle.Fill
usc.Show()
Catch ex As Exception
MsgBox(ex.Message)
End Try
This script returned an error:
Unable to cast object of type 'WindowsControlLibrary1.UserControl1' to type 'System.Windows.Forms.Form'.
I need to add the UserControl1 on my project form. Is there any UserControl Container or something that I should add on my form?
|
|
|
|
|
The form IS the container. You're trying to treat a UserControl as a Form, which won't work at all.
You really need to rethink your design because what you're trying to do now just isn't going to work. The only option you have, with what you've got now, is to put that usercontrol on a form.
|
|
|
|
|
Wuaaaa thanks, I've modified my code.
Dim usc As UserControl
Try
Me.WindowState = FormWindowState.Maximized
usc = LoadAssembly("C:\WindowsControlLibrary1.dll", "WindowsControlLibrary1.UserControl1")
usc.Dock = DockStyle.Fill
Me.Controls.Add(usc)
Catch ex As Exception
MsgBox(ex.Message)
End Try
It works
Then I add uiBase.vb (UserControl) inside WindowsControlLibrary1, and made the UserControl1 inherits the uiBase. But when I was trying to call with "WindowsControlLibrary1.UserControl1" it failed to load. I've tried to call with parameter "WindowsControlLibrary1.uiBase.UserControl1" too, but it still returned me an error.
Ooooh, I need help here
Thanks
Best Regard,
Indra Permana Rusli
- No Signature Available -
|
|
|
|
|
Refer back to the replies from Dave and I.
Indra_PR wrote: Dim usc As UserControl
Try
Me.WindowState = FormWindowState.Maximized
usc = LoadAssembly("C:\WindowsControlLibrary1.dll", "WindowsControlLibrary1.UserControl1")
usc.Dock = DockStyle.Fill
Me.Controls.Add(usc)
Catch ex As Exception
MsgBox(ex.Message)
End Try
Where is this code snippet located. What is "me" in this instance? Is me referring to a form?
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Yep, me refers to a form. It has no problem, the problem is in here:
usc = LoadAssembly("C:\WindowsControlLibrary1.dll", "WindowsControlLibrary1.UserControl1")
- No Signature Available -
|
|
|
|
|
It turns to be missing reference from my library. I have add the reference in the MDI parent project and it works.
- No Signature Available -
|
|
|
|
|
I have two combo box in Datagridview. one is Department and Manager.Initially i'm binding All the Department and All Manager in dropdown. when select the department then manager combo should bind with selected department manager. I have done till here.
but i'm facing a problem if i select one department in first row then it binds All rows with selected department's manager value. i want to bind it row wise. so every column in different row bind accroding to its department row wise.
any suggestion?
Amit Agarwal
|
|
|
|
|
So are you saying that you want to update the current row only? If so then you can use the grdMyGrid.CurrentRow property. When you change the value of your department dropdown, the CurrentCell property is set which in turn sets the CurrentRow property. You can then use something like
grdMyGrid.CurrentRow.Cells("ManagerCell").value = ManagerValue
If this is not what you meant then I apologise and can you post some of your code so I/we can get a better idea of the problem.
|
|
|
|
|
If the relation is one-to-one, I think you can do something like this:
Me.cboDepartment.DataBindings.Clear()
Me.cboDepartment.DataBindings.Add(New Binding("SelectedValue", Me.cboManager, "SelectedValue"))
I assumed that you made your combobox setting like this:
cboDepartment.ValueMember = "manager"
cboDepartment.DisplayMember = "department"
cboManager.ValueMember = "manager"
cboManager.DisplayMember = "manager"
So the program will read it like this:
cboDepartment.SelectedValue = cboManager.SelectedValue
cboManager.SelectedValue = cboDepartment.SelectedValue
Thanks, I hope this can answer your question.
Best Regard,
Indra Permana Rusli
- No Signature Available -
|
|
|
|
|
In my home everyone will use system all account are admin. Is there something I can do to keep my family from installing anything in the computer without my permission?
Main purpose is there are not seen the drive or drive space and license and options.
I saw 3rd party tool can i build such tools in vb.net
Plzz help me
Thanks.
|
|
|
|
|
I guess you could program this but I would try it with the user settings first.
Make one admin account (yours) and restrict all other account to user accounts.
Based on that you should be able to do most if not all off what you want.
|
|
|
|
|
Problem is my brother also use the Admin account that also password protect. He is installing many games so that I want prevent. plzz help me...
|
|
|
|
|
Well if you are an admin you can change his account into a normal user account.
Like I said you could write a program for this but it's not going to work as good as the windows security. And it will cost you alot off time.
|
|
|
|