|
I´m trying to make an "administrative console style" application using
vb.net (an application with a visual layout as usual mmc console applications). I'm
using a main form with a SplitContainer. In the left SplitterPanel I have
a TreeView control, and my idea is to open "subforms" in the right side
SplitterPanel. This is easy to do with code like:
Dim frm As Form
frm = New subform
frm.TopLevel = False
Me.SplitterPanel1.Panel2.Controls.Add(frm)
frm.Show()
This works. The problem is when need to resize the main form. The
"subform" remains in the some original size. Can someone tell me how
to force the subform to resize ? Is there any better way to make
this "administrative console like" type of applications?
Thank you
|
|
|
|
|
You can play around with the form's Dock or Achor properties. Dock will 'stick' the form in Top/Bottom/Left/Right/Fill position in the panel. Achor let the panel resize the form according to which side you want to 'stick' it to.
Remember most if not all controls have these 2 properties too.
|
|
|
|
|
i have to send data packets (9 bytes each) to another terminal device. However due to the hardware design of the terminal device there has to be a pause of 26.3 milli secs between two data packets. in case the pause duration is not matched the device is unable to accept the data. please post a suitable code for delaying the com port output for this specified duration (26.3 m secs).
shergill
|
|
|
|
|
I don't know that you are going to achieve this with Windows and VB. The system timers exposed by the OS do not have the resolution you are looking for. In any case they are not guaranteed to pop exactly at the interval to which you have set them (very close yes - but not exact).
Is there any leeway in the packet timing to the terminal or is it a very old black box?
Seems to me that you may need a hardware interface between the computer and terminal to handle this problem.
...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
|
|
|
|
|
hi steve thanx for replying. firstly answers to your querries - well the terminal device is a black box. the leeway that we can have in this pause if from 26.1 to 26.7 milli seconds.next i cannot go in for a hardware solution as the package i am making is a universal applicaion for some other blackboxes also which have different pauses between the data transmissions. i percieve three options, firstly i tried the "do while loop with a counter delay" that was working somwhere around this range but not exact 26.3,hence is not exactly suited. secondly, the inbuilt timer object is also not of much help as it is not accurate in this range. thirdly, i read about some kernel32 commands that may be used. can you just tell me if it can be of any use to me and how if yes? then can i embed some C++ counters or delays in vb. your help is greatly solicited also thanx anyway for replying the first time..
shergill
|
|
|
|
|
As stated in the article I quoted (my 2nd reply to your post) the Windows timers are not going to be as accurate as you need for this application.
No amount of application code in a high level language like VB, C, C++ etc... is going to do it for you. I think you'll need to create a device driver for your black box (essentially a new serial port driver) to handle the timing for you. This way the driver can operate at the kernel level and respond to interrupts rather than at the application level.
...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 found this article on The Code Project[^] which describes the Windows OS timing. Hope it helps.
...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
|
|
|
|
|
Dose anyone know how i can use RDA on a desktop application rather than a PDA, you would think that there must be some sort of solution.
Thanks
|
|
|
|
|
How can we change column header(Listview) forecolor and backcolor ?
mandev2005
|
|
|
|
|
Hi
I want to connect the datagrid with access programically .
I mean i want to fill the datagrid with data at run time.
I am using oledb
I am using the following code
Set rs = New ADODB.Recordset
rs.Open sql, con, adOpenStatic, adLockBatchOptimistic, adCmdText
Set dg1.DataSource = rs
dg1.Refresh
Can somebody please send me any link or code?
Please help me
Thank You
Pankaj Garg
-- modified at 7:39 Tuesday 2nd May, 2006
|
|
|
|
|
I have a data grid which shows the clients that I have in a database, then when I press the button to add a new client, it is successful, however when I get redirected back to the datagrid the client that I just entered doesn't show up as the last client. In order to make it work i have to make a refresh button, but I want it done automatically.Any ideas ?
I appreciate your help
thanks
ad
scar
|
|
|
|
|
Are you using Winform or Web Form?
Anywayz I think you first add client add code
then update your dataset
then refresh your dataset
then select data again.
Hope you will understand what i mean to say..
|Muhamad Waqas Butt|
waqasb4all@yahoo.com
www.sktech.freewebspace.com
|
|
|
|
|
hello, i want to know how to make a startup program. when the computer starts up i want the program to start up immediately! how can i make this happen
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
|
|
|
|
|
Please search the forums, this has been anwser several times!
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
make an entry into your registry. e.g., ur path of program to be executed is c:\xx.exe,
> just goto start|run & type regedit
> follow the following dir
HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\RUN
> make a string value on the right side say xx
> double click on xx entry and enter the path(say c:\xx.exe) of your appl in value textbox
> restart ur system & check it
Lxcite's Planet
... the ultimate solution
-- modified at 7:32 Tuesday 2nd May, 2006
|
|
|
|
|
My VB app uses a form to input the report parameters and call a second form containing the crystal object with the formated report with subreports, this works fine until the report form is closed and the user enters a second set of parameters in the parameter form and calls the report form again, The code that logs the subreports into the database fails stating "Object reference not set to an instance of an object"
For index = 0 To objReport.ReportDefinition.Sections.Count - 1
For intCounter = 0 To _
objReport.ReportDefinition.Sections(index).ReportObjects.Count - 1
With objReport.ReportDefinition.Sections(index)
If .ReportObjects(intCounter).Kind = _
CrystalDecisions.Shared.ReportObjectKind.SubreportObject Then
mySubReportObject = CType(.ReportObjects(intCounter), CrystalDecisions.CrystalReports.Engine.SubreportObject)
mySubRepDoc = mySubReportObject.OpenSubreport(mySubReportObject.SubreportName)
For intCounter1 = 0 To mySubRepDoc.Database.Tables.Count - 1
mySubRepDoc.Database.Tables(intCounter1).ApplyLogOnInfo(ConInfo) 'sp;
mySubRepDoc.Database.Tables(intCounter1).ApplyLogOnInfo(ConInfo)
Next
End If
End With
Next
Next
the code loops thru the sections to find subreports and logs them into the DB but only works on first execution.
Any suggestions?
|
|
|
|
|
Hi to all,
I have a question for anyone who can help me on the subject custom controls in design time.
What i want to achieve is following:
how can you create a method/function in the propertypage in the visual studio IDE just klike the ones you have with like for example the SQLDataAdapter (in the help/description field some links appear with behind that some wizard functionality). Anyone any ide how to do that? I don't seem to find any good example anywhere.
Another thing i wanna do (i know i ask a lot, but it aren't common things in my eyes so that why i post everything here ) is to add custom section in the app.config during design time ( so not to the compiled app.exe.config !!!!!) What is the easiest way to do such a thing, i mena can i just use the executing aasembly name? or is there a catch.
For thos who can help me, many thanks in advance.
Mike Martin
mike martin
|
|
|
|
|
My system is built in VB,
the problem is some of the DLL and OCX files r not working properly, although i've tried to copy them from VB setup file but its still not working properly, i think its a dll hell problem, how can i make my system to refer to the dll of my choice.
pls help.
|
|
|
|
|
What version of VB ? What do you mean by 'not working properly' ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
OCX files and ActiveX dlls need to be registered.
Use the regsrv32.exe command line, or use the package and deployment tool to build a release for your setup that automatically registers all the dependencies.
'--8<------------------------
Ex Datis:
Duncan Jones
Merrion Computing Ltd
|
|
|
|
|
Dear All,
I always encounter syntax error on INSERT TO.
I am sure my code is correct but I do not know where go wrong.
Below is my code.
Private Sub btnsave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsave.Click
Me.Cursor = Cursors.WaitCursor
Dim row As DataRow = dataTable.Rows(currRec)
txtdatefrom.Text = datestart.Value.Date.ToString
txtdateto.Text = DateEnd.Value.Date.ToString
row.BeginEdit()
row("Ship_Name") = ComboBox1.SelectedItem
row("Container") = Container_SizeTextBox.Text
row("datefrom") = txtdatefrom.Text
row("dateto") = txtdateto.Text
row("DateCreate") = Date.Today
row.EndEdit()
dataAdapter.Update(ds, "shipment")
ds.AcceptChanges()
ToggleControls(True)
btnnew.Enabled = True
insertSelected = False
Me.Cursor = Cursors.Default
MsgBox("Record Created")
End Sub
Private Sub InitializeCommands()
' Preparing Insert SQL Command
dataAdapter.InsertCommand = conn.CreateCommand()
dataAdapter.InsertCommand.CommandText = "INSERT INTO shipment " + _
"( Ship_Name, Container, datefrom, dateto, DateCreate)" + _
"VALUES( @Ship_Name, @Container, @datefrom, @dateto, @DateCreate)"
AddParams(dataAdapter.InsertCommand, "Ship_Name", "Container", "datefrom", "dateto", "DateCreate")
end sub
Private Sub AddParams(ByVal cmd As OleDbCommand, ByVal ParamArray cols() As String)
' Adding Hectice parameters in SQL Commands
Dim col As String
For Each col In cols
cmd.Parameters.Add("@" + col, OleDbType.WChar, 0, col)
Next
End Sub
Can anyone please advise.
Thank in advance....
Jack Wong
|
|
|
|
|
Hi,
I have created a proxy socket with a TCPListener which receives client connections and sends request to the backend webserver and sends the response back from the backend server to the clients.
In this excercise, the HTML part is getting transferred correctly but the Images are not getting transferred. I am able to transfer only BMP images.
After receiving the response from the backend server, I check if the mime type returned is text or not. If it is text then I convert the bytes into string and pass on to the client socket. If it is not text(i.e. image) then send it in the same byte form as sent by the backend server. This works only for BMP images and not GIF or JPG images.
please help
|
|
|
|
|
Visual Basic 2005 Express Edition:
My application creates a one page report and prints it out. The page includes an image.
Now, I would like to save that page to a file, so, that it could later be retrieved and viewed on the screen and also have the ability to reprint it.
|
|
|
|
|
You could print it to a pdf printer driver,
or print it to an EMF spool file and use the EMF Spoolfile Viewer in my articles on this site to print/preview it thereafter
'--8<------------------------
Ex Datis:
Duncan Jones
Merrion Computing Ltd
|
|
|
|
|
OK, but, which one should I go with (I am planning to market this program)?
|
|
|
|