|
sorry i am new to this, how do i create a subform in my main form window in vs2003?
thnks
Crazzy SH!T
|
|
|
|
|
Do you mean an mdi child form ? If so you can set the MdiParent of your main form to true. And in your code, create an instance of the sub form and show it.
My Blog
|
|
|
|
|
Me.Hide()
Dim F2 As New subForm()
F2.ShowDialog()
Me.Show()
|
|
|
|
|
DIM FRM2 AS FORM2()
FRM2.SHOW()
|
|
|
|
|
Hi,
can i get the connection string to connect to a microsoft access database in a remote mechine.
"Provider=Microsoft.Jet.OLEDB.4.0;server=127.0.0.1;database=" & Application.StartupPath & "\News.mdb;UID=;Password=;".
can i set something like this?
Thanks for your attention.
Thomas
|
|
|
|
|
I myself have used this so try it
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=remotemachine\db.mdb;User Id=;Password=;
Regards
|
|
|
|
|
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=remotemachine\db.mdb;User Id=; Password=;
|
|
|
|
|
Sir,
as your direction. i set the connection like this.
Dim strConString As String
Dim Cn As OleDbConnection
strConString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=http://loacalhost/D:\News\News\bin\News.mdb"
Cn = New OleDbConnection(strConString)
Cn.Open()
This will make an error : Not a valid file name.
Thanks for reply
Thomas
|
|
|
|
|
I have a class which inherits Component which I need to serialise to the InitializeComponent() method of a form. This is done with a type converter attribute:-
<TypeConverterAttribute(GetType(Design.DocumentParagraphTextStyleConverter)), _
ToolboxBitmap(GetType(DocumentParagraphTextStyle)), _
DesignTimeVisibleAttribute(False), ToolboxItemAttribute(False)> _
Public Class DocumentParagraphTextStyle
Inherits Component
End Class
However when I save a form with this component on it the instance is not initialised in the InitializeComponent() section correctly. The variable is created e.g.
Friend WithEvents DocumentParagraphTextStyle_Heading As StructuredDocuments.DocumentParagraphTextStyle
and the properties are set e.g.:
Me.DocumentParagraphTextStyle_Heading.BorderColor = System.Drawing.Color.Black
Me.DocumentParagraphTextStyle_Heading.BorderWidth = 1.0!
Me.DocumentParagraphTextStyle_Heading.BottomBorder = True
Me.DocumentParagraphTextStyle_Heading.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!)
Me.DocumentParagraphTextStyle_Heading.Forecolour = System.Drawing.Color.Black
Me.DocumentParagraphTextStyle_Heading.Highlight = System.Drawing.Color.Transparent
Me.DocumentParagraphTextStyle_Heading.HorizontalAlignment = StructuredDocuments.DocumentParagraphTextStyle.CellTextHorizontalAlignment.CentreAlign
Me.DocumentParagraphTextStyle_Heading.LeftSideBorder = False
Me.DocumentParagraphTextStyle_Heading.RightSideBorder = False
Me.DocumentParagraphTextStyle_Heading.StyleName = "DocumentParagraphTextStyle_Heading"
Me.DocumentParagraphTextStyle_Heading.TopBorder = False
Me.DocumentParagraphTextStyle_Heading.VerticalAlignment = StructuredDocuments.DocumentParagraphTextStyle.CellTextVerticalAlignment.MiddleAlign
But the variable is not initialised i.e. the line at the top of the InitialiseComponent sub that should read:-
me.DocumentParagraphTextStyle_Heading = New StructuredDocuments.DocumentParagraphTextStyle()
is missing.
Any thoughts/ideas/comments?
'--8<------------------------
Ex Datis:
Duncan Jones
Merrion Computing Ltd
|
|
|
|
|
*sigh* - as is always the case, as soon as I gave up and posted the question I worked out what was wrong.
The component needs a constructor that takes the IContainer e.g:
Public Sub New(ByVal Container As System.ComponentModel.IContainer)
MyClass.New()
Container.Add(Me)
End Sub
'--8<------------------------
Ex Datis:
Duncan Jones
Merrion Computing Ltd
|
|
|
|
|
how to connect with microsoft access database in a remote mechine?
Please help me
Thomas
|
|
|
|
|
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\itweb\SMS_GSM\db.mdb;User Id= ;Password= ;
|
|
|
|
|
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=remotemachine\db.mdb;User Id= ;Password= ;
|
|
|
|
|
Downloaded the printing example but get 14 errors related to serialization. What do i do.
rankin_5204
rangling@yahoo.com
|
|
|
|
|
First step would be to indicate which printing sample you are talking about: perhaps with a link and then post the text of the error message(s)...
'--8<------------------------
Ex Datis:
Duncan Jones
Merrion Computing Ltd
|
|
|
|
|
rankin_5204 wrote: Downloaded the printing example but get 14 errors related to serialization. What do i do.
For a start you could try FIXING them
Since we are not psychics we cannot even start to guess what problems you are having.
...Steve
1. quod erat demonstrandum
2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once
|
|
|
|
|
Hello, I'm not sure if this counts as drag and drop, but I need to be able to move a picture box around inside a panel and have it return what the mouse was last pointing at. Here's what I've got now:
Private Sub myUnitHandler_DragStart(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs)<br />
If e.Button = MouseButtons.Left Then<br />
dragging = sender<br />
sender.DoDragDrop(sender, DragDropEffects.All)<br />
sender.bringtofront()<br />
end if<br />
end sub<br />
Private Sub myTerritoryHandler_DragEnter(ByVal sender As Object, ByVal e As Windows.Forms.DragEventArgs)<br />
e.Effect = DragDropEffects.Move<br />
end sub<br />
Private Sub myTerritoryHandler_DragDrop(ByVal sender As Object, ByVal e As Windows.Forms.DragEventArgs)<br />
e.Effect = DragDropEffects.None<br />
dragging.Left = MousePosition.X - 5<br />
dragging.Top = MousePosition.Y - 182<br />
dragging.endcountry = sender.name<br />
dragging.beachland = 0<br />
dragging = 0<br />
end sub
As you can see, this uses mouse positioning to move it and it only works with 1 screen setup. I've tried using something like this:
Private Sub myUnitHandler_DragStart(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs)<br />
If e.Button = MouseButtons.Left Then<br />
dragging = sender<br />
sender.DoDragDrop(sender, DragDropEffects.All)<br />
sender.bringtofront()<br />
oldx = mouseposition.x<br />
oldy = mouseposition.y<br />
msgbox(oldx)<br />
msgbox(oldy)<br />
End If<br />
End Sub<br />
Private Sub myTerritoryHandler_DragEnter(ByVal sender As Object, ByVal e As Windows.Forms.DragEventArgs)<br />
e.Effect = DragDropEffects.Move<br />
End Sub<br />
Private Sub myTerritoryHandler_DragDrop(ByVal sender As Object, ByVal e As Windows.Forms.DragEventArgs)<br />
e.Effect = DragDropEffects.None<br />
dragging.Left += (MousePosition.X - oldx)<br />
dragging.Top += (MousePosition.Y - oldy)<br />
msgbox(oldx & " " & oldy)<br />
End Sub
but it seems that the drag event happens before the mousearg because the later msgboxes fire first and have empty oldx and oldy vars.
I'm sure someone has a better idea than this and I'd love to hear any help!
Thanks,
Mike
Gaming at the GuildofBlades.com is the only way to really experiece the level 99 Soul-Sucking Sword!
|
|
|
|
|
Hey everyone,
I'm having a problem with an updown thingy. When you click the up and down arrows it adds or subtracts from your total money to spend, but if you manually imput a number into the box it doesn't change the money. :-/
Here's part of my code where "rs" is the total you have to spend:
Private Sub resourcesValue()<br />
If purchase Then<br />
spent = scal + sinf + sgen + sart + skni + sport<br />
lblResources.Text = "Available Resources: " & rs - spent<br />
If (rs - spent < 0) Then<br />
lblResources.ForeColor = Color.Red<br />
btnPurchase.Enabled = False<br />
Else<br />
lblResources.ForeColor = Color.Black<br />
btnPurchase.Enabled = True<br />
End If<br />
End If<br />
End Sub<br />
Private Sub udCalvary_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles udCalvary.ValueChanged<br />
scal = udCalvary.Value * 8<br />
resourcesValue()<br />
End Sub<br />
Private Sub udKnight_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles udKnight.ValueChanged<br />
skni = udKnight.Value * 11<br />
resourcesValue()<br />
End Sub<br />
Private Sub udInfantry_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles udInfantry.ValueChanged<br />
sinf = udInfantry.Value * 5<br />
resourcesValue()<br />
End Sub
I have limits set, but it does not return to the maximum when i push the button. Here's what happens.
I have 80 money to spend. I enter into the udInfantry control the number 80, meaning I need 400 money, but when I push the button, it gives me the 16 infantry that I purchased that turn (IE, 80/5 is 16 infantry) and does not subtract anything from my money.
I believe this is how you set limits:
<br />
udCalvary.Maximum = Math.Floor(rs / 8)<br />
udKnight.Maximum = Math.Floor(rs / 11)<br />
udInfantry.Maximum = Math.Floor(rs / 5)<br />
udArtillery.Maximum = Math.Floor(rs / 10)<br />
udGeneral.Maximum = 1<br />
If Math.Floor(rs / 10) >= 1 Then<br />
udPort.Maximum = 1<br />
Else<br />
udPort.Maximum = 0<br />
End If
Any idea?
Mike
Gaming at the GuildofBlades.com is the only way to really experiece the level 99 Soul-Sucking Sword!
-- modified at 2:21 Tuesday 30th May, 2006ming at the GuildofBlades.com is the only way to really experiece the level 99 Soul-Sucking Sword!
|
|
|
|
|
Is it possible to create a wizard in VB.NET? If so, can you direct me towards the instructions for creating such an item.
Cheers,
bryndabella
|
|
|
|
|
Instead of creating your own wizard from scratch, why not consider a dotnet component that you can customize. For insrance, have a look at
http://www.divil.co.uk/net/controls/wizardframework/[^]
There are other organisations that have wizard components.
modified 1-Aug-19 21:02pm.
|
|
|
|
|
Thanks very much Richard, i will take a look.
|
|
|
|
|
Had a look at the Wizard divelements offers and I was rather impressed!
I recommend a review.
Wesley Burger
083 518 7135
|
|
|
|
|
Hi everybody
I am writing a customised software like vb in vb.!!!
please do not misunderstand.
i will be having a software in which i shall have certin objects like timers picture boxes button (very limited ones). i shall let users set their properties and alignment on the screen.
This Application(or form) designed by the user should be able to be able to run standalone after saved. just visualise it like vb!!
I am plannig to start by declaring a syntax for the language in a dll.
make a master software that can read my language. create a dll that can understand it. then somehow call each function into the master form and play it.
then the language can be converted into a gui based vb type software.
the project seems wierd. if anyone can help me. please post as son as possible.
thanks
regards
|
|
|
|
|
With what part of this project do you need help? A specific question will getyou answers.
...Steve
1. quod erat demonstrandum
2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once
|
|
|
|
|
I have a vb.net 2003 application. I have created the deployment project but I can not for the life of me change the icon image for the shortcut to the desktop. I go to the properties window of the shortcut (under file editor) and browse for the icon image (.ico), select it, but the image file never appears under the current icon windows. I have even type the icon image name into the Icon property box and it just disappears. Any ideas???
Thanks so much.
Mary R.
|
|
|
|