|
My macros stopped working. At work our my docs are located on a network drive. This drive failed and my macro files all had a size of 0.
I copied the macros folder from another dev machine back into my docs (on the newly replaced network drive). The typical default Samples are now displayed. Recording new macros appears to work fine. I can see the temp macros in the macro explorer window. I can press Edit and see the code which also appears to look correct.
When attempting to run any macro, VS just doesn't do anything. It doesn't run the macro, it doesn't display an error or anything.
Anyone run into this before? Any idea how to reset the macros to work properly?
|
|
|
|
|
Got this working again................
|
|
|
|
|
Hi
I have the following script
Dim DStartR As String
Dim DStartC As String
Dim DEndR As String
Dim DEndC As String
Dim StartLocation As String
Dim EndLocation As String
Worksheets(SetMonth).Range("D5").Select
DStartR = "=Cell(""row"",RC)" 'ROW ADDRESS OF D5
DStartC = "=Cell(""row"",R[-1]C)" 'COLUMN ADDRESS OF D5
Worksheets(SetMonth).Range("E5").Select
DEndR = "=Cell(""row"",RC)" 'ROW ADDRESS OF
DEndC = "=Cell(""row"",R[-1]C)"
How do I combine the variables DStartR and DStartC to give me a variable called StartLocation and variables DEndR and DEndC to give me a variable called EndLocation
I then need to generate a calculation using these points which will update as their contents change.
I was using a For LOOP to generate a Variable called DTOTAL, however once the script had finished, it wouldn't update when D5/E5 changed, as a result I need to generate a sum at a location that could potential change based on various generated information.
ie run1 of the script could put DTOTAL at cell reference A22, however run2 of the script could put DTOTAL at cell reference A23 etc.
as a result I need to use the following line of code I think
ActiveCell.Value = "=sum(" & StartLocation &":" & EndLocation &)"
I am unable to check the above as I cant' figure out how to generate StartLocation and EndLocation
I am going to carry on trying to figure out how to do what I need to do, however if some1 can give me a heads up, it would be appreciated
Thanks In Advance
|
|
|
|
|
I tried to Google this but I dont really know what I am trying to ask I guess.
How can I emulate what the SqlCommandType property does with regard to the 3 choice list? You can only choose Text, Stored Procedure and TableDirect. I have the need to do the same thing.
CleaKO
"Now, a man would have opened both gates, driven through and not bothered to close either gate." - Marc Clifton (The Lounge)
|
|
|
|
|
Can you give some code? My first thought was you might use an Enum in some way, but it is hard to know without knowing what you want your method to do...
|
|
|
|
|
|
I have inserted the records into database using sql bulk copy.
bulk.WriteToServer(dataset.Tables(student), DataRowState.Added)
For example I have inserted a record name -tom,age 23
Now i want to update the age to 25
bulk.WriteToServer(dataset.Tables(student), DataRowState.modified)
The above code is not updating the values .
Can anyone give the solution for updating the values in table using sql bulk copy??
|
|
|
|
|
SQL Bulk Copy does what it's name says. BULK COPY this means it INSERTS into a table. You cannot use bulkcopy to update data. Use a normal connection and SQL statement to do this.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi all,
I have made some controls.
Now i want to have some icons in the toolbar. How can I do that?
Jan
This is my DLL
|
|
|
|
|
|
Thanks.
i give it a try
Jan
|
|
|
|
|
Sorry, but that will not work.
i do not have some error but the toolbar stays with the default icons.
i also tryed with embedded resources, normal resources and filenames. with ico-files and bmp files
Some peaple say replace the points with underscores. so also tryed that. still no luck.
All the help on the internet speaks about 2003 or 2005. remember that I use know 2008.
In 2003 i have succeded the icons but not always.
almost all examples are in C but I need VB
If someone have another idee. maybee with an example? That will help me.
Jan
to all who will or helped me thanks
|
|
|
|
|
Hello,
I am using vb.net 2005. I wam using Windings font in my program. I would like to copy and register the font in the clients computers while they run the setup deployment.
How can I add it to my setup project?
Thank you for help
Shay Noy
|
|
|
|
|
I am not quite sure how to add them to the setup, but make sure you have the correct permissions/copyright to distribute the font in question.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|
|
Go to the File System Editor in your project.
Add a new Fonts Folder and place your font here.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
I SOLVED THIS MYSELF. If you need to know how, please visit http://www.xtremevbtalk.com/showthread.php?p=1301781&posted=1#post1301781[^]
------------------------------------------------------------------------------------------
I have been bashing my head against this wall for quite some time, there is a lack of information on the subject.
I am trying to draw a .png with it's alpha channel as a graphic on a form. The alpha channel works well when i draw on the existing form background but i want nothing BUT the image to be drawn. No background and any semi transparent pixels are to be drawn as is. (see through)
I have tried plenty of methods until i came across http://www.codeproject.com/KB/vb/xDock.aspx[^]
Now here is the question(s) i have:
* What steps do i need to take to override all painting functions of a form and only use GDI and GDI+ to draw Bitmaps.
* And what steps do i need to take to draw .png files with alpha transparency on that said form using GDI and GDI+
* I have the source code from the XDock example but there is very little explanation to how it works, i would love it if someone could explain HOW it does the job and how i can write my own version to understand it.
At this current time my source code is a cluster**** of different approaches, the current lines i am trying to get to work is:
Public Sub SetBitmap(ByVal bitmap As Bitmap, ByVal opacity As Byte)
If Not (bitmap.PixelFormat = PixelFormat.Format32bppArgb) Then
Throw New ApplicationException("The bitmap must be 32ppp with alpha-channel.")
End If
hBitmap = bitmap.GetHbitmap(Color.FromArgb(0))
oldBitmap = Win32.SelectObject(memDc, hBitmap)
Dim size As Win32.Size = New Win32.Size(bitmap.Width, bitmap.Height)
Dim pointSource As Win32.Point = New Win32.Point(0, 0)
Dim topPos As Win32.Point = New Win32.Point(Left, Top)
Dim blend As Win32.BLENDFUNCTION = New Win32.BLENDFUNCTION
blend.BlendOp = Win32.AC_SRC_OVER
blend.BlendFlags = 0
blend.SourceConstantAlpha = opacity
blend.AlphaFormat = Win32.AC_SRC_ALPHA
Win32.UpdateLayeredWindow(Handle, screenDc, topPos, size, memDc, pointSource, 0, blend, Win32.ULW_ALPHA)
End Sub
This is what should draw the form's graphic content, at the moment i get nothing drawn.
Here follows my bitmap graphics:
Dim SF As StringFormat = New StringFormat()
SF.Alignment = StringAlignment.Center
SF.LineAlignment = StringAlignment.Center
BB.DrawString("* EDIT MODE *" & vbCrLf & ActiveEditObj.Name & vbcrlf & Cursor.Position.ToString & vbcrlf & EditHasMouse0.ToString, HugeBFont, New SolidBrush(Color.FromArgb(50 + (Flux * 100), 255, 0, 0)), me.ClientRectangle, SF)
Dim BitTest As Bitmap = New Bitmap(application.StartupPath & "\img\closebtn.png")
BB.DrawImageUnscaled(BitTest, 10, 10)
Where BB is a graphic object created from BBBitmap.
BBBitmap = New Bitmap(Me.ClientSize.Width, Me.ClientSize.Height)
BB = graphics.FromImage(BBBitmap)
I have a reoccurring event that calls:
SetBitmap(BBBitmap, 255)
And like i said above, NOTHING gets drawn. But if i place a button on the form it is drawn and flickers alot, so something is definitely working. But not as intended.
Thank you for any help!
modified on Monday, August 18, 2008 1:12 PM
|
|
|
|
|
I am creating a window application in .net. There I have used datagridview. I want to add button in gridview and on click of that button there should be popup window-form with employee number.
So how can i find row click event for button column
|
|
|
|
|
iam a having a string like this 'hi this is "john" iam a 'good,' boy:' so how can i get the words like this
hi
this
is
john
iam
a
good
boy
mean even though there are special characters we should get ony srtings
|
|
|
|
|
split is the right word. The string class has a split method.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
I would be saying first replace all characters different then 0123456789abcdefghijklmnopqrstuvwxyz with "" EXCEPT spaces.
Then split on the on you space and voila !
Do Or Don't, there is no "try catch ex as exception end try"
|
|
|
|
|
What the....
|
|
|
|
|
He's talking about getting rid of the embedded double and single quotes in the string!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I know my thought process sometimes is funny to say the least, but i think this one is actually correct
Do Or Don't, there is no "try catch ex as exception end try"
|
|
|
|
|
I am presently using WM_COPYDATA and SendMessage to pass string data from a c++ app to my vb.net app.
Everything works but the response time gets sluggish in the c++ app waiting for vb.net app to process the message.
I would like to use PostMessage to speed up the string data transfer.
I read somewhere that I cannot use WM_COPYDATA with PostMessage.
How can I use PostMessage to do my data transfer?
I would like to see both the vb.net code for receiving data from PostMessage
and
the c++ code for sending data with PostMessage
Will the use of PostMessage really speed up the sending app?
Any suggestions , examples or links would be greatly appreciated
Roger
VS2005 Std / WinXP Pro SP3
|
|
|
|
|
I have no clue what you are talking about with the PostMessage deal but my i suggest making a thread that handles the c++ to vb messaging like a background worker?
|
|
|
|