|
Hello,
VS 2008
I have created a C++ smart device DLL and added it to my project.
From my VB program I can call the functions successfully in the DLL. Using the code below
<br />
<DllImportAttribute("WIN32SmartDLL.dll")> _ <br />
Private Shared Function AddNumbers(ByVal a As Integer, ByVal b As Integer) As Integer <br />
End Function <br />
<br />
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) <br />
Dim answer As Integer = AddNumbers(25, 25) <br />
<br />
End Sub <br />
However, I need to be able to get the DLL to get information from the VB program.
Many thanks for any advice on this,
Steve
|
|
|
|
|
The way to get C++ to talk to VB is to make the VB dll a COM dll.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I'm using Lucene.Net to index a DB. Getting all the records is quickly done, but when i index them, the memory just keeps going up on my application. This is how the code looks:
Private writer As Lucene.Net.Index.IndexWriter
Private Sub InsertDBIndexData(ByVal sCPR As String)
Dim doc As New Document
Dim f1 As New Field("CPR", sCPR, Field.Store.YES, Field.Index.TOKENIZED)
doc.Add(f1)
writer.AddDocument(doc)
doc = Nothing
Return
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim odConnection As OleDbConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=....mdb...")
odConnection.Open()
writer = New Lucene.Net.Index.IndexWriter(DBIndexLocation, New StandardAnalyzer, True)
Dim odCommand As OleDbCommand = New OleDbCommand("select * from TPers", odConnection)
'Dim odReader As OleDbDataReader = odCommand.ExecuteReader
Dim odDataAdaptor As OleDbDataAdapter = New OleDbDataAdapter(odCommand)
Dim odDataSet As DataSet = New DataSet
odDataAdaptor.Fill(odDataSet, "TPers")
Dim odDataTable As DataTable = odDataSet.Tables("TPers")
For Each dr As DataRow In odDataTable.Rows
InsertDBIndexData(dr("cpr").ToString)
Next
writer.Optimize()
writer.Close()
odDataAdaptor.Dispose()
odConnection.Close()
End Sub
i've tried to use oledbdatareader instead of oledbdataadaptor, which seems to be alot faster when indexing, but it is still takes up ALL the memory. Opening and closing the Lucene writer doesn't help either.
I know i probably should be asking in some Lucene.Net forum, but i'm not sure if the problem lies in that code.
And i know i've asked a question pretty much similar to this. But this isn't the same
|
|
|
|
|
I have a large panel in which I would like to put 3 subpanels.
The 3 panels should be stacked.
I’d like the big panel to have a scrollbar at the bottom, allowing all 3 subpanels to move left and right together when the images are wider than the form.
I’d like a horizontal splitter between each of the three subpanels
If I dock the subpanels to the top, then the horizontal scrollbar at the bottom of the big panel doesn’t show.
But if I dock the subpanels to the left then I can’t put splitters between the 3 horizontal subpanels.
Anyone know what I’m missing?
Thanks
|
|
|
|
|
I don't know if this is what you're looking for, but you can use two SplitContainer controls to do this. Add one SplitContainer to your top-level Panel control, then add a second one to the right half of the SplitContainer you already dropped. Then you can drop you child Panel controls into each pane of those splitters and dock them to the parent containers.
|
|
|
|
|
But splitcontainers are too complicated. If you get more than three panels you can't keep track very well. It seems to me that panels should be able to do this.
This is what doesn't make sense to me. Is there an explanation?
1. A panel that is docked left shows a horizontal scroll bar when it is wider than the form.
2. But a panel that is docked top never shows a horizontal scrollbar, even when it is wider than the form?
3. And (this is the strangest), a panel that is docked left does not show a horizontal scrollbar if anotther panel is docked top inside of it.
I must be missing something here.
Thanks!
|
|
|
|
|
cstrader232 wrote: It seems to me that panels should be able to do this
It's not the panels job to do this. You need a container that manages this for the panels. The panels just know how to dock to their parent container - that's all.
cstrader232 wrote: But splitcontainers are too complicated.
How so?? There's a container on one side of the splitter and a container on the other side. What's the big deal that makes this so complicated?
cstrader232 wrote: 1. A panel that is docked left shows a horizontal scroll bar when it is wider than the form.
2. But a panel that is docked top never shows a horizontal scrollbar, even when it is wider than the form?
3. And (this is the strangest), a panel that is docked left does not show a horizontal scrollbar if anotther panel is docked top inside of it.
This is exactly why you dock the panels "Fill", not Top or Left. The container the panel is docked in should be managing the scroll bars, not the panels themselves.
|
|
|
|
|
Thanks... that's helpful, although I still think there must be a better solution than splitcontainers.
|
|
|
|
|
I'm trying to get and modify both the OuOfOffice and OutOfOffice properties of the session object from within an application developed in VB with VS2005. There are apparently no errors in the code:
1 Dim MyOutL As Object
2 MyOutL = CreateObject("MAPI.Session")
3 MyOutL.Logon("Outlook")
4 MyOutL.OutOfOfficeText = Label1.Text & Format(DateTimePicker1.Value, "dddd dd MMMM yyyy") & ComboBox1.Text & "."
5 MyOutL.OutOfOffice = True
6 MyOutL.Logoff()
7 MyOutL = Nothing
8 GC.Collect()
but when executing the statement at line 4 tha application hangs.
Anyone can help me?
Giorgio
|
|
|
|
|
hi...
how to update row in datagridview without using separate button for update
while user entering data or modifing it as to be update in database too
thanks in advance
regards,
vidya
|
|
|
|
|
Maybe handle datagridview.cellclick or .cellleave?
|
|
|
|
|
hi
thanks for ur reply ,tried with that too unable to update automatically
i am using datagridview with binding source so help me out with some other events
vidya
|
|
|
|
|
CellEndEdit event is what you need
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
hi
thank u ,but tell me explain it,in datagridview added column like-button,textbox,combobox,textbox,2 checkbox.i have used here two adapter.one for combobox,2 adapter for remaining.now i would like update the enter or update in row by the supplier.
thanks in advance.
vidya
|
|
|
|
|
you should google it for more info
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
How can I format the display in crystal report showing the first page of the report on the 1/4 part of the paper and the second page on the second 1/4 part of the paper. So when you view the report 4 pages will be shown on a 1 page paper.
|
|
|
|
|
hello guys,
Iam doing a project in VB.NET.Every thing is done except report generation.
plz help. i don't know how to genetate a report in vb.net.I want to generate a report in which data are taken from the data base in SQL server.
i wan to generate a report in such a manner that according to the given interval of time ie.,with in a month or two.
plz answer immediatly to this forum or to revathskumar@gmail.com
yours faithfully
revath
|
|
|
|
|
revath wrote: plz answer immediatly
No. When I darn well feel like it
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
hi revath,
you can use crystal report to generate the reporting in vb.net and set range of date to select a disered period wise report
rmshah
Developer
|
|
|
|
|
Is there a relatively 'foolproof' way to either determine the smtp server being used by a user of ones program, or alternatively a 'default' setting that one could assign as the smtp host that should work.
This is for use in an application that will be utilising system.net.mail for automatic e mailing. I would prefer to avoid having to ask the end user to supply such information during the installation, simply because not all of thenm would know what it is.
Most of the searches that I have done around this all seem to include a 'hardcoded' smtp host, which is the one thing I'm trying to avoid.
Any suggestions would be greatly appreciated.
|
|
|
|
|
No. The best you can do is to use the settings for a mail server you know of, that you have the right to use.
Member 4427614 wrote: This is for use in an application that will be utilising system.net.mail for automatic e mailing
Sounds evil.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Christian
Thanks for your quick reply, I was starting to think the same, so now I guess I'm going to have to turn
my attention to doing an NSLookup during the installation routine and seeing if I can get the information I need from there, unless you have a better idea that is.
Dom
|
|
|
|
|
Hello Friends
I have created a .msi file for my first vb.net 2005 applicatiion.
when i installed it to another machine(running on xp also having .net framework 2.0)
while running the application it generates the error
windows application1 encountered a problem and it needs to be close
'System invalid operation exception occured'
Can any one kindly help to solve this problem
Thanks in advance.
V.Baulraj
|
|
|
|
|
Wow - you deployed an app called windows application 1 ?
We really can't tell you much, you've not given us much to go on. If it runs then crashes, it's not .NET that is missing. What is your app trying to do when it crashes ? What is different between the machines ? Your best bet is a top level try/catch that shows you a stack trace so you know what function is failing, then you can take it from there.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi Everyone,
I am using Janus controls(Grid) . The performance is slower to bind the data using dataset and vertical scroll bar takes time to expand the information. Can anyone help me out in finding an solution to this.
Regards,
Manowj
|
|
|
|