473,699 Members | 2,096 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

A couple questions

1) When using images for an application (such as in an ImageList or as the
image for a button), are the images embedded in the application or must the
image files be included in the setup package?

2) Is there a way to adjust the individual column widths of a DataGrid which
has no TableStyles or GridColumnStyle s? Also, is there a way to make it
impossible for the user to resize the columns and rows?
Nov 20 '05 #1
3 983
#1. you can do either way. Embed them as a resource or add them to your
install package and have your app look for them in a particular directory.
#2. Not sure.
james

(I know, not a lot of help)

"jy836" <mo***@nospam.c om> wrote in message
news:B1e_b.1045 63$jk2.474135@a ttbi_s53...
1) When using images for an application (such as in an ImageList or as the
image for a button), are the images embedded in the application or must the image files be included in the setup package?

2) Is there a way to adjust the individual column widths of a DataGrid which has no TableStyles or GridColumnStyle s? Also, is there a way to make it
impossible for the user to resize the columns and rows?

Nov 20 '05 #2
Hi,

2) You need a tablestyle to adjust the column width. You need to create a
new datagrid to prevent the column and row resize.

Public Class NoResizeDataGri d

Inherits DataGrid

Protected Overrides Sub OnMouseDown(ByV al e As
System.Windows. Forms.MouseEven tArgs)

Dim hti As DataGrid.HitTes tInfo = Me.HitTest(New Point(e.X, e.Y))

If hti.Type = DataGrid.HitTes tType.ColumnRes ize Or hti.Type =
DataGrid.HitTes tType.RowResize Then

Return 'no baseclass call

End If

MyBase.OnMouseD own(e)

End Sub

Protected Overrides Sub OnMouseMove(ByV al e As
System.Windows. Forms.MouseEven tArgs)

Dim hti As DataGrid.HitTes tInfo = Me.HitTest(New Point(e.X, e.Y))

If hti.Type = DataGrid.HitTes tType.ColumnRes ize Or hti.Type =
DataGrid.HitTes tType.RowResize Then

Return 'no baseclass call

End If

MyBase.OnMouseM ove(e)

End Sub

End Class

Ken

-----------------------------

"jy836" <mo***@nospam.c om> wrote in message
news:B1e_b.1045 63$jk2.474135@a ttbi_s53...
1) When using images for an application (such as in an ImageList or as the
image for a button), are the images embedded in the application or must the image files be included in the setup package?

2) Is there a way to adjust the individual column widths of a DataGrid which has no TableStyles or GridColumnStyle s? Also, is there a way to make it
impossible for the user to resize the columns and rows?

Nov 20 '05 #3
"james" <jjames700ReMoV eMe at earthlink dot net> wrote in message
news:ei******** ********@TK2MSF TNGP09.phx.gbl. ..
#1. you can do either way. Embed them as a resource or add them to your
install package and have your app look for them in a particular directory.
#2. Not sure.
james

(I know, not a lot of help)


How do you embed an image as a resource (for a button)? Simply by adding an
image to the image property of a button? Thanks.
Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3067
by: bjs | last post by:
I hope I've got the right group here and apologies if I haven't. I'm a hobby programmer and have just upgraded to Visual Basic.net and have a couple of questions if anybody can help. In VB 6 you could print using a print command that included Print, Line, CurrentX, CurrentY etc etc. I am SURE there will be a way in VB.net yet can find no trace - can somebody help? Secondly, I know this is old tech but using DAO I could write programs...
1
1568
by: hoochiegooch | last post by:
Hi, all. I have a couple of questions about NAnt. 1. Is there a better way to invoke NAnt from a C# "Master Test Rig" than shelling out? IOW, how should an ASP.NET web app or Windows Service kick off a NAnt build session? 2. We have some test tools that can
21
3845
by: Rob Somers | last post by:
Hey people, I read a good thread on here regarding the reason why we use function prototypes, and it answered most of my questions, but I wanted to double check on a couple of things, as I am writing something up on functions, and I don't like writing about things I am not sure about. Ok, then, here we go: I initially thought that one would only really need to use a function
1
1486
by: dln | last post by:
Howdy. I'm a bit new to C# and got a couple of quick questions that perhaps someone can help me answer. First, is there a property that you set on a TextBox control that will force the control to accept only numerical data (i.e. - only numbers 0 to 9, a decimal and the negative sign)? So far, I've had to do the validation manually on either a key down or OnValidate event. Secondly, is there any way to preview a key stroke for a given...
4
1192
by: Sccr18 | last post by:
I just have a couple of easy questions: 1. In Asp.net using Vb is there a way to list all the possible characters without listing them all like Char() = "abc..."? 2. I was trying to set the focus to a text and was not able to by using txtEmp.setfocus(). I read somewhere that this may not be possible, is that true? 3. When you sign on to my web page that I am making and go to type something into the textboxes, dropdown boxes with...
3
1116
by: punt | last post by:
I've got a couple of questions about a deployed VB.NET application. Firstly can a deployed application remember any variables(single string) after being closed down and re-opened, without the use of a database? Secondly I've been looking at inserting bookmarks into a word template like shown in: http://support.microsoft.com/default.aspx?scid=kb;EN-US;316383 Is it possible to insert an image into a bookmark as well, or does it only work...
0
505
by: Marc | last post by:
Hi, I'm working with a customer that is trying to find a solution to provide geographical redundancy. Our application is currently using IBM DB2 v8.2. I have a couple of questions with regards to HADR: 1. DB2 HADR (Can it be used to support geographical redundancy in a nested fashion (ie. Synchronous HADR at a site, and ASYNCRONOUS between sites using the same instances/databases). If so how
3
1591
by: Ron | last post by:
Hello everyone, I have a couple of questions really quick questions. I am creating a dispatch database. What I would really like to do is have to option of automatically inserting the time when I hit the "]" button. Is this possble? Also I am trying to create a form that has the standard boxes contained within it and I would also like to add a subform or something simular in
3
1101
by: melton9 | last post by:
I'm just getting into using datagrid and have a couple of questions. 1.)How do you get the grid to show the values of a datatable automatically? Currently I have to hit the + sign and then select "getNews"(the datatable) to show my data. 2.) I have this set up to a loop. So after I view my grid any updates in the loop causes the datagrid to go blank(ie gray box). Anybody know what I should add to make the datagrid correctly
0
1263
by: Newish | last post by:
Hi Couple of questions on datagrid 1) Is there a performance issue when using datagrid to display data from a datatable. 2) Is there a security issue when using datagrid to display data from a datatable and enable it to allow edits as well.
0
8691
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8620
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9038
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8887
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7755
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4378
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4633
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2351
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2012
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.